<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="UTF-8">
    <link rel="stylesheet" th:href="@{/styles.css}" />
    <title>Title</title>
</head>
<body>
<form method="post" th:action="@{/student/getCourse}" th:object="${studentInfo}">
        <table border="0" align="center" width="600">
                <tr> <td colspan="3" align="center" height="40" id="title">学生信息</td></tr>
                <tr>
                       <td id="t" align="right"><label>姓名:</label> </td>
                        <td><input  type="text" th:field="*{name}" /></td>
                        <td><span class="validationError" th:if="${#fields.hasErrors('name')}" th:erros="*{name}">请输入你的名字</span></td>
                </tr>
                <tr>
                        <td id="t" align="right"> <label>学号:</label></td>
                        <td><input  type="text" th:field="*{sno}" /></td>
                        <td><span class="validationError" th:if="${#fields.hasErrors('sno')}" th:erros="*{sno}">学号长度必须为10</span></td>
                </tr>
                <tr>
                        <td id="t" align="right"><label>年级:</label></td>
                        <td><input  type="text" th:field="*{grade}" /></td>
                        <td><span class="validationError" th:if="${#fields.hasErrors('grade')}" th:erros="*{grade}">请输入你的年级，如18级</span></td>
                </tr>
                <tr>
                        <td id="t" align="right"><label>专业:</label></td>
                        <td><input  type="text" th:field="*{department}" /></td>
                        <td><span class="validationError" th:if="${#fields.hasErrors('department')}" th:erros="*{department}">请输入你的专业</span></td>
                </tr>
                <tr>
                        <td id="t" align="right"><label>学院:</label></td>
                        <td><input  type="text" th:field="*{academy}" /></td>
                        <td><span class="validationError" th:if="${#fields.hasErrors('academy')}" th:erros="*{academy}">请输入你的学院</span></td>
                </tr>
                <tr>
                        <td colspan="3" align="center" height="40">
                                <input type="submit" value="提交信息">
                        </td>
                </tr>
        </table>
    </form>
</div>

</body>
</html>